<?php defined('IN_YUNYECMS') or exit('No permission.'); ?><!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Document Title -->
    <title><?php echo $seo["title"] ;?></title>
    <meta name="keywords" content="<?php echo $seo["keywords"] ;?>" />
    <meta name="description" content="<?php echo $seo["description"] ;?>" />
    <!-- Favicon -->
    <link rel="shortcut icon" href="<?php echo $lang["icon"] ;?>" />
    <link href="<?php echo YUNYECMS_PUBLIC;?>plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" />
    <link href="<?php echo TPL;?>static/css/330c760da5274f2dbf7d140358eadd2d.css" rel="stylesheet">
    <link href="<?php echo YUNYECMS_PUBLIC;?>plugins/lightbox/css/lightbox.css" rel="stylesheet">
    <!--==== Font-Awesome css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/font-awesome.min.css">
    <!--==== Bootstrap css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/bootstrap.min.css">
    <!--==== Swiper css file ====-->
    <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/swiper-8.3.2/swiper-bundle.min.css">
    <!--==== Color Switcher css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/color-switcher.css">
    <!--==== Ui Slider css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/jquery-ui.min.css">
    <!--==== Shop Style css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/shop-style.css">
    <!--==== Style css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/style.css">
    <!--==== Responsive css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/responsive.css">
    <!--==== Theme Color 1 css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/theme-color-1.css">

    <!--==== Custom css file ====-->
    <link rel="stylesheet" href="<?php echo TPL;?>static/css/custom.css?20190113">
</head>

<body>

    <!-- Main header -->
    <!-- End of Main header -->
    <?php include tpl("head"); ?>
    <!-- Page title -->
    <?php 
        if($rootcat["pic"]) :
    ?>
    <section class="page-title-wrap" data-bg-img="<?php echo $rootcat["pic"] ;?>" data-rjs="2">
        <div class="container">
            <div class="row align-items-center">
                <div class="col">
                    <div class="page-title" data-animate="fadeInUp" data-delay="1.05">
                        <h1><?php echo $rootcat["title"] ;?></h1>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php 
        endif;
    ?>
    <!-- End of Page title -->
    <div class="breadcumb-wrapper">
        <div class="container">
            <div class="pull-left">
                <ul class="list-inline link-list">
                    <li><a href="/">首页</a></li>
                    </li>
                    <?php $tag_parse = core::load_class('tag_parse');$data=$tag_parse->breadcumb_tag(array('catid'=>$catid));?>
                    <?php if(is_array($data)): $i = -1; $__DATA__ = $data;if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                    <?php if($v['id']!=$catid ) { ?>
                    <li><a href="<?php echo $v["url"] ;?>"><?php echo $v["title"] ;?></a></li>
                    <?php } else { ?>
                    <li><span><?php echo $v["title"] ;?></span></li>
                    <?php } ?>
                    <?php  endforeach;  endif; ?>
                    
                </ul>
            </div>
            <div class="float-right">
            </div>
            <div class="clearfix"></div>
        </div>
    </div>
    <section class="pt-50 default-bg">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="shop-details">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="shop--details-inner pb-30">
                                    <!-- Start shop product details  -->
                                    <div class="product-details">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6">
                                                <div class="shop--product-slider pic-slider" style="margin-top: 0px;"
                                                    data-animate="fadeInUp" data-delay=".2">
                                                    <div id="gallery" class="swiper">
                                                        <div class="swiper-wrapper">
                                                            <div class="swiper-slide"><a class="example-image-link"
                                                                    href="<?php echo $row["pic"] ;?>" data-lightbox="example-set"
                                                                    target="_blank"><img class="example-image"
                                                                        src="<?php echo $row["pic"] ;?>" alt="<?php echo $row["title"] ;?>" /></a></div>
                                                            <?php if(!empty($row['morepic'])): foreach($row['morepic'] as
                                                                $key=>$var):?>
                                                            <div class="swiper-slide"><a class="example-image-link"
                                                                    href="<?php echo $var;?>" data-lightbox="example-set"
                                                                    target="_blank"><img class="example-image"
                                                                        src="<?php echo $var;?>" /></a></div>
                                                            <?php endforeach; endif;?>
                                                        </div>
                                                    </div>
                                                    <div id="thumbs" class="swiper">
                                                        <div class="swiper-wrapper">
                                                            <div class="swiper-slide"><img src="<?php echo $row["pic"] ;?>"
                                                                    alt="<?php echo $row["title"] ;?>" /></div>
                                                            <?php if(!empty($row['morepic'])):
                                                                foreach($row['morepic'] as
                                                                $key=>$var):?>
                                                            <div class="swiper-slide"><img src="<?php echo $var;?>"
                                                                    alt="<?php echo $row["title"] ;?>" /></div>
                                                            <?php endforeach; endif;?>
                                                        </div>
                                                    </div>
                                                </div>



                                            </div>

                                            <div class="col-lg-6 col-md-6">
                                                <!-- Start product details -->
                                                <div class="shop--product-details" data-animate="fadeInUp"
                                                    data-delay=".4">
                                                    <h2><?php echo $row["title"] ;?></h2>

                                                    <div class="producut-dis">
                                                        <p class="muli"></p>
                                                    </div>
                                                    <div class="product-abelity">
                                                        <h6>型号 : <span><?php echo $row["xinghao"] ;?></span></h6>
                                                    </div>
                                                    <div class="product-abelity">
                                                        <h6>功能 : <span><?php echo $row["gongneng"] ;?></span></h6>
                                                    </div>
                                                    <div class="product-abelity">
                                                        <h6>材料 : <span><?php echo $row["cailiao"] ;?></span></h6>
                                                    </div>
                                                    <?php if(!empty($row['price'])) :?>
                                                    <div class="product-price">
                                                        <h6>价格 : <span class="price text-danger">￥<?php echo $row["price"] ;?>元</span>
                                                            &nbsp;<span class="text-gray"
                                                                style="text-decoration: line-through;">￥<?php echo $row["mprice"] ;?>元</span>
                                                        </h6>
                                                    </div>
                                                    <?php endif;?> <!-- Start product category -->
                                                    <div class="product-abelity">
                                                        <h6>描述 : <span> <?php echo $row["summary"] ;?></span></h6>
                                                    </div>
                                                    <form id="cartform" method="post"
                                                        action="<?php echo url('shop/cart/add')?>">
                                                        <div class="mb-15"> 数量：
                                                            <div class="btn-group btn-group-sm">
                                                                <button type="button" class="btn btn-default"
                                                                    onClick="jian();">-</button>
                                                                <input type="text" class="form-control text-center"
                                                                    id="num" name="num" value="1"
                                                                    style="width: 50px;border-radius: 0;">
                                                                <button type="button" class="btn btn-default"
                                                                    onClick="jia();">+</button>
                                                            </div>
                                                        </div>
                                                        <input type="hidden" name="gid" value="<?php echo $row["id"] ;?>" />
                                                        <input type="hidden" name="catid" value="<?php echo $row["catid"] ;?>" />
                                                        <?php echo $token;?>
                                                        <button type="submit" class="btn  btn-flat  btn-primary"><i
                                                                class="fa fa-shopping-cart" aria-hidden="true"></i>
                                                            在线购买
                                                        </button>
                                                        </li>
                                                    </form>
                                                    <script language="javascript">
                                                        function jia() {
                                                            cur = $('#num').val();
                                                            cur = parseInt(cur);
                                                            $('#num').val(cur + 1);
                                                        }
                                                        function jian() {
                                                            cur = $('#num').val();
                                                            cur = parseInt(cur);
                                                            if (cur > 1) {
                                                                $('#num').val(cur - 1);
                                                            } else {
                                                                $('#num').val(1);
                                                            }
                                                        }									  
                                                    </script>
                                                    <!-- End of product category -->
                                                    <!-- Start product Share  -->
                                                    <div class="product-share mt-15">
                                                        <div class="bdsharebuttonbox"><a href="#" class="bds_more"
                                                                data-cmd="more"></a><a href="#" class="bds_qzone"
                                                                data-cmd="qzone" title="分享到QQ空间"></a><a href="#"
                                                                class="bds_tsina" data-cmd="tsina"
                                                                title="分享到新浪微博"></a><a href="#" class="bds_tqq"
                                                                data-cmd="tqq" title="分享到腾讯微博"></a><a href="#"
                                                                class="bds_renren" data-cmd="renren"
                                                                title="分享到人人网"></a><a href="#" class="bds_weixin"
                                                                data-cmd="weixin" title="分享到微信"></a></div>
                                                        <script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script>
                                                    </div>
                                                    <!-- End of product Share  -->
                                                </div>
                                                <!-- End of product details -->
                                            </div>
                                        </div>
                                    </div>
                                    <!-- End of shop product details  -->
                                    <style>
                                        .product-discription p {
                                            margin-bottom: 0px;
                                        }
                                    </style>
                                    <!-- Start shop product tab inner-->
                                    <div class="product-tabbed" data-animate="fadeInUp" data-delay=".2">
                                        <div class="row">
                                            <div class="col">
                                                <div class="product--info-review">
                                                    <!--Start shop product nav -->
                                                    <div class="product--nav-inner mb-30">
                                                        <nav>
                                                            <div class="nav info-tabs">
                                                                <a class="product--nav-item active show"
                                                                    id="nav-contact-tab" data-toggle="tab"
                                                                    href="#riv">产品详细</a>
                                                            </div>
                                                        </nav>
                                                    </div>
                                                    <!--End of shop product nav -->
                                                    <!-- start product discription -->
                                                    <div class="product--discription-inner">
                                                        <div class="tab-content product--review-info">
                                                            <div class="tab-pane fade  show active" id="riv"
                                                                role="tabpanel">
                                                                <div class="product-discription text-center">
                                                                    <?php echo $row["content"] ;?>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="row margin-top-20">


                                                    </div>

                                                    <!-- start product discription -->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- End of shop product tab inner-->

                                    <!-- Start shop related product -->
                                    <?php if($row['seokeywords']) { ?>
                                    <div class="related-product">
                                        <h4>相关产品</h4>
                                        <div class="row">
                                            <?php $tag_parse = core::load_class('tag_parse');$data=$tag_parse->relation_tag(array('catid'=>$catid,'num'=>'20','id'=>$id,'keywords'=>$row['seokeywords']));?>
                                            <?php if(is_array($data)): $i = -1; $__DATA__ = $data;if(count($__DATA__)==0 )  echo "" ;foreach($__DATA__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                                            <div class="col-lg-3 col-md-3">
                                                <!-- single product -->
                                                <div class="sigle--product mb-40">
                                                    <div class="product--item text-center" data-animate="fadeInUp"
                                                        data-delay=".2">
                                                        <a href="<?php echo $v["url"] ;?>" target="_blank">
                                                            <img src="<?php echo $v["pic"] ;?>" data-rjs="2" alt="Product Image">
                                                            <h5 class="pt-sans">
                                                                <?php echo strcut($v["title"],15); ?>
                                                            </h5>
                                                        </a>
                                                    </div>
                                                </div>

                                                <!-- single product -->
                                            </div>
                                            <?php  endforeach;  endif; ?>
                                            

                                        </div>
                                    </div>
                                    <?php } ?>
                                    <!-- ENd shop related product -->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>



    <?php include tpl('foot'); ?>
    <!-- JS Files -->
    <script src="<?php echo YUNYECMS_UI;?>plugins/jQuery/jquery-3.6.1.min.js"></script>
    <!-- ==== Bootstrap js file==== -->
    <script src="<?php echo TPL;?>static/js/bootstrap.bundle.min.js"></script>

    <!-- ==== JQuery Waypoint js file==== -->
    <script src="<?php echo TPL;?>static/js/jquery.waypoints.min.js"></script>

    <!-- ==== Sticky js file==== -->
    <script src="<?php echo TPL;?>static/js/sticky.min.js"></script>

    <!-- ==== Swiper js file==== -->
    <script src="<?php echo YUNYECMS_UI;?>plugins/swiper-8.3.2/swiper-bundle.min.js"></script>

    <!-- ==== Parsley js file==== -->
    <script src="<?php echo TPL;?>static/js/parsley.min.js"></script>

    <!-- ==== Color Switcher js file==== -->
    <script src="<?php echo TPL;?>static/js/color-switcher.js"></script>

    <!-- ==== Ratina js file==== -->
    <script src="<?php echo TPL;?>static/js/retina.min.js"></script>

    <!-- ==== Isotope  js file==== -->
    <script src="<?php echo TPL;?>static/js/isotope.pkgd.min.js"></script>

    <!-- ==== Ui silider js file==== -->
    <script src="<?php echo TPL;?>static/js/jquery-ui.min.js"></script>

    <!-- ==== Light box js file==== -->

    <!-- ==== Google api ==== -->
    <script src="<?php echo TPL;?>static/js/96fa9afd00264d7da65dfbacb1401cc6.js"></script>

    <!-- ==== Menu  js file==== -->
    <script src="<?php echo TPL;?>static/js/menu.min.js"></script>

    <!-- ==== Scrippt js file==== -->
    <script src="<?php echo TPL;?>static/js/scripts.js"></script>

    <!-- ==== Custom js file==== -->
    <script src="<?php echo TPL;?>static/js/custom.js"></script>

    <script src="<?php echo YUNYECMS_PUBLIC;?>plugins/lightbox/lightbox.js"></script>
    <script language="javascript">
        var gallerySwiper = new Swiper('#gallery', {
            spaceBetween: 10,
            thumbs: {
                swiper: {
                    el: '#thumbs',
                    spaceBetween: 10,
                    slidesPerView: 4,
                    watchSlidesVisibility: true,
                },
            }
        })
        //设置缩略图Swiper的边框
        gallerySwiper.thumbs.swiper.$el.css({ 'border': '1px solid #f5f5f5' })
    </script>

</body>

</html>